﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/Admin.master" AutoEventWireup="true" CodeFile="LandscapesManager.aspx.cs" Inherits="admin_LandscapesManager" %>
<%@ Register Namespace="Encosia" Assembly="HighslideImage" TagPrefix="encosia" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .style2
        {
            color: yellow;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:MultiView ID="MultiView1" runat="server">
        <asp:View ID="View1" runat="server">
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="3"
                DataKeyNames="landscapeID" ForeColor="Black" GridLines="Vertical" OnRowDeleting="GridView1_RowDeleting"
                Width="820px" OnRowEditing="GridView1_RowEditing" 
                OnSelectedIndexChanging="GridView1_SelectedIndexChanging" AllowPaging="True" 
                OnPageIndexChanging="GridView1_PageIndexChanging" BackColor="White" 
                BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" 
                AllowSorting="True" EmptyDataText="No Record Found!">
                <FooterStyle BackColor="#CCCCCC" />
                <Columns>
                    <asp:BoundField DataField="NO" HeaderText="No">
                    <HeaderStyle ForeColor="Yellow" CssClass="text_right"/>
                    <ItemStyle Width="5px" CssClass="text_right"/>
                    </asp:BoundField>
                    <asp:BoundField DataField="landscapeName" HeaderText="Name">
                    <ControlStyle Width="100px" />
                    <HeaderStyle ForeColor="Yellow" CssClass="text_left"/>
                    <ItemStyle Width="150px" CssClass="text_left"/>
                    </asp:BoundField>
                    <asp:BoundField DataField="race" HeaderText="Race">
                    <HeaderStyle ForeColor="Yellow" CssClass="text_right"/>
                    <ItemStyle Width="20px" CssClass="text_right"/>
                    </asp:BoundField>
                    <asp:BoundField DataField="landscapeDescription" HeaderText="Description" 
                        HtmlEncode="False" HtmlEncodeFormatString="False" >
                    <HeaderStyle ForeColor="Yellow" CssClass="text_left"/>
                    <ItemStyle CssClass="text_left"/>
                    </asp:BoundField>
                    <asp:TemplateField ShowHeader="False">
                        <EditItemTemplate>
                            <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" CommandName="Update"
                                Text="Update"></asp:LinkButton>
                            <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="Cancel"
                                Text="Cancel"></asp:LinkButton>
                        </EditItemTemplate>
                        <ItemStyle Width="20px" />
                        <ItemTemplate>
                            &nbsp;<asp:ImageButton ID="ImageButton1" runat="server" CausesValidation="False" 
                                CommandName="select" ImageUrl="~/img/edit.gif" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField ShowHeader="False">
                        <ItemStyle Width="20px" />
                        <ItemTemplate>
                            &nbsp;<asp:ImageButton ID="ImageButton2" runat="server" CausesValidation="False" 
                                CommandName="Delete" ImageUrl="~/img/delete.gif" 
                                onclientclick="return confirm('Are you sure?');" />
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <SelectedRowStyle Font-Bold="False" />
                <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
                <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                <AlternatingRowStyle BackColor="#CCCCCC" />
                <%--<SortedAscendingCellStyle BackColor="#F1F1F1" />
                <SortedAscendingHeaderStyle BackColor="#808080" />
                <SortedDescendingCellStyle BackColor="#CAC9C9" />
                <SortedDescendingHeaderStyle BackColor="#383838" />--%>
            </asp:GridView>
            <table style="width: 100%">
                <tr>
                    <td colspan="2">
                        <asp:LinkButton ID="LinkButton3" runat="server" 
                            OnClick="LinkButton3_Click" Font-Underline="True" ForeColor="White">New Landscape</asp:LinkButton>
                    </td>
                </tr>
            </table>
        </asp:View>
        <br />
        <asp:View ID="View2" runat="server">
            <table style="width: 90%">
                <tr>
                    <td colspan="2">
                        <strong><span style="font-size: 16pt; " class="style2">New Landscape</span></strong></td>
                </tr>
                <tr>
                    <td style="width: 20%; " class="style1">
                        Name:</td>
                    <td style="width: 80%; text-align: left">
                        <asp:TextBox ID="txtDeptName" runat="server" Width="213px"></asp:TextBox>
                        <span style="color:Red">
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                ControlToValidate="txtDeptName"
                                ErrorMessage="Department Name is required!">(*)</asp:RequiredFieldValidator>
                        </span>
                    </td>
                </tr>
                <tr>
                    <td class="style1" style="width: 20%; ">
                        Race:
                    </td>
                    <td style="width: 80%; text-align: left">
                        <asp:TextBox ID="txtRace" runat="server" Width="52px">70</asp:TextBox>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                            ControlToValidate="txtRace" ErrorMessage="Race must is number!" ForeColor="Red" 
                            ValidationExpression="[\d ]*">(*)</asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:TextBox ID="txtDescription" runat="server" Width="100%" Height="61px"
                            TextMode="MultiLine"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td style="text-align: left" colspan="2">
                        <fieldset>
                        <legend class="style2">Upload Multiple Photos</legend>
                        <div id="div1" runat="server">
                            <input type="file" size="65" runat="server" id="FileUpload1"/>
                            <input type="file" size="65" runat="server" id="FileUpload2"/>
                            <input type="file" size="65" runat="server" id="FileUpload3"/>
                            <input type="file" size="65" runat="server" id="FileUpload4"/>
                            <input type="file" size="65" runat="server" id="FileUpload5"/>
                        </div>
                        <br />
                        <div id="div2" runat="server" visible="false">
                            <input type="file" size="65" runat="server" id="FileUpload6"/>
                            <input type="file" size="65" runat="server" id="FileUpload7"/>
                            <input type="file" size="65" runat="server" id="FileUpload8"/>
                            <input type="file" size="65" runat="server" id="FileUpload9"/>
                            <input type="file" size="65" runat="server" id="FileUpload10"/>
                        </div>
                        <br />
                            <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Upload" 
                                CausesValidation="False" />
                        <asp:Button ID="ButtonMore" runat="server" Text="Add 10 Photos" 
                                OnClick="ButtonMore_Click" CausesValidation="False" />
                        </fieldset>
                        <br />

                        <div id="div5" runat="server" visible="true">
                        <fieldset>
                        <legend class="style2">Show Photos</legend>
                        <div id="div3" runat="server" class="highslide-gallery">
                        <encosia:HighslideManager ID="HighslideManager1" runat="server" OutlineType="RoundedWhite" ControlBar="true" />
                            <asp:Image ID="Image1" runat="server" Height="100" Width="100" ImageUrl="" />
                            <asp:Image ID="Image2" runat="server" Height="100" Width="100" ImageUrl="" />
                            <asp:Image ID="Image3" runat="server" Height="100" Width="100" ImageUrl="" />
                            <asp:Image ID="Image4" runat="server" Height="100" Width="100" ImageUrl="" />
                            <asp:Image ID="Image5" runat="server" Height="100" Width="100" ImageUrl="" />
                        </div>
                        <br />
                        <div id="div4" runat="server" visible="false">
                            <asp:Image ID="Image6" runat="server" Height="100" Width="100" ImageUrl="" />
                            <asp:Image ID="Image7" runat="server" Height="100" Width="100" ImageUrl="" />
                            <asp:Image ID="Image8" runat="server" Height="100" Width="100" ImageUrl="" />
                            <asp:Image ID="Image9" runat="server" Height="100" Width="100" ImageUrl="" />
                            <asp:Image ID="Image10" runat="server" Height="100" Width="100" ImageUrl="" />
                        </div>
                        </fieldset>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:ValidationSummary ID="ValidationSummary1" runat="server" ForeColor="Red" 
                            Width="311px" />
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:Button ID="btnAdd" runat="server" OnClick="btnAdd_Click" Text="Add new" 
                            Width="79px" />
                        &nbsp;&nbsp;
                        <asp:Button ID="btnCancel" runat="server" CausesValidation="False" 
                            OnClick="btnCancel_Click" Text="Back" Width="81px" />
                    </td>
                </tr>
            </table>
        </asp:View>
        <br />
        <asp:View ID="View3" runat="server">
            <table style="width: 90%">
                <tr>
                    <td colspan="2">
                        <strong><span style="font-size: 16pt; " class="style2">Edit Landscape</span></strong></td>
                </tr>
                <tr>
                    <td style="width: 20%; " class="style1">
                        Name:</td>
                    <td style="width: 80%; text-align: left">
                        <span style="color:Red">
                        <asp:TextBox ID="TextBox1" runat="server" Width="213px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                            ControlToValidate="TextBox1" ErrorMessage="Department Name is required!">(*)</asp:RequiredFieldValidator>
                        </span>
                    </td>
                </tr>
                <tr>
                    <td class="style1" style="width: 20%; ">
                        Race:
                    </td>
                    <td style="width: 80%; text-align: left">
                        <asp:TextBox ID="txtRaceEdit" runat="server" Width="52px">70</asp:TextBox>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                            ControlToValidate="txtRaceEdit" ErrorMessage="Race must is number!" 
                            ForeColor="Red" ValidationExpression="[\d ]*">(*)</asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:TextBox ID="TextBox2" runat="server" Width="100%" Height="61px" 
                            TextMode="MultiLine" CssClass="tinymce" EnableViewState="False"></asp:TextBox>
                    </td>
                </tr>
                 <tr>
                    <td style="text-align: left" colspan="2">
                        <fieldset>
                        <legend class="style2">Upload Multiple Photos</legend>
                        <div id="div1Edit" runat="server">
                            <input type="file" size="65" runat="server" id="FileUpload1Edit">
                            <input type="file" size="65" runat="server" id="FileUpload2Edit">
                            <input type="file" size="65" runat="server" id="FileUpload3Edit">
                            <input type="file" size="65" runat="server" id="FileUpload4Edit">
                            <input type="file" size="65" runat="server" id="FileUpload5Edit">
                        </div>
                        <br />
                        <div id="div2Edit" runat="server" visible="false">
                            <input type="file" size="65" runat="server" id="FileUpload6Edit">
                            <input type="file" size="65" runat="server" id="FileUpload7Edit">
                            <input type="file" size="65" runat="server" id="FileUpload8Edit">
                            <input type="file" size="65" runat="server" id="FileUpload9Edit">
                            <input type="file" size="65" runat="server" id="FileUpload10Edit">
                        </div>
                        <br />
                            <asp:Button ID="btnUploadEdit" runat="server" OnClick="btnUploadEdit_Click" 
                                Text="Upload" CausesValidation="False" />
                        <asp:Button ID="btnButtonMoreEdit" runat="server" Text="Add 10 Photos" 
                                OnClick="btnButtonMoreEdit_Click" CausesValidation="False" />
                        </fieldset>
                        <br />

                        <div id="div5Edit" runat="server" visible="false">
                        <fieldset>
                        <legend class="style2">Show Photos</legend>
                        <div id="div3Edit" runat="server">
                            <%--<encosia:HighslideImage ID="Image1Edit" runat="server" Width="100" Height="100"
                                    ImageUrl="" FullImageURL="" 
                                    Caption="A screenshot of a usage example." />--%>
                            <asp:Image ID="Image1Edit" runat="server" Height="100" Width="100" ImageUrl=""/>
                            <asp:Image ID="Image2Edit" runat="server" Height="100" Width="100" ImageUrl="" />
                            <asp:Image ID="Image3Edit" runat="server" Height="100" Width="100" ImageUrl="" />
                            <asp:Image ID="Image4Edit" runat="server" Height="100" Width="100" ImageUrl="" />
                            <asp:Image ID="Image5Edit" runat="server" Height="100" Width="100" ImageUrl="" />
                        </div>
                        <br />
                        <div id="div4Edit" runat="server" visible="false">
                            <asp:Image ID="Image6Edit" runat="server" Height="100" Width="100" ImageUrl="" />
                            <asp:Image ID="Image7Edit" runat="server" Height="100" Width="100" ImageUrl="" />
                            <asp:Image ID="Image8Edit" runat="server" Height="100" Width="100" ImageUrl="" />
                            <asp:Image ID="Image9Edit" runat="server" Height="100" Width="100" ImageUrl="" />
                            <asp:Image ID="Image10Edit" runat="server" Height="100" Width="100" ImageUrl="" />
                        </div>
                        </fieldset>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:ValidationSummary ID="ValidationSummary2" runat="server" ForeColor="Red" 
                            Width="311px" />
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:Button ID="btnEdit" runat="server" OnClick="btnEdit_Click" Text="Edit" 
                            Width="81px" />
                        &nbsp; &nbsp;&nbsp;
                        <asp:Button ID="btnCancel2" runat="server" CausesValidation="False" 
                            OnClick="btnCancel2_Click" Text="Back" Width="79px" />
                    </td>
                </tr>
            </table>
        </asp:View>
    </asp:MultiView>

    <script language="javascript" type="text/javascript">
        $(document).ready(function () {
            $("#ctl00_ContentPlaceHolder1_GridView1").tablesorter();
        });
    </script>
</asp:Content>
